//前台检测密码是否一致
var check_confirm=function(){
	return{
		check_confirm : function() {
			var pw1=$("#pw").attr('value');
			var pw2=$("#newPassword").attr('value');
			if(pw2 != pw1){
				cdms.common.show_error('tr_form_msg', language.account.confirm_password_not_match);
			}else{
				cdms.common.show_info('tr_form_msg', "");
				cdms.common.form_submit('chpwd_form', {}, function (data) {
					if (data.type) {
						$.alert({title:language.note.alert_title,message:language.account.pwd_change_succ,fnOk:function(){
							window.location.href = "../logout";
						}});
					} else {
			            cdms.common.show_error('tr_form_msg', data.msg);
					}
				});
				$("#chpwd_form").submit();
			}
		}
	}
}();

